package com.lenovo.nova.widget.dialog.buildview;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.lenovo.nova.utils.R;
import com.lenovo.nova.widget.dialog.BaseDialogFragment;

/**
 * loading dialog
 * @author scenic
 *
 */
public class WaitDialogViewBuilder implements DialogFragmentBuilder {

	private View rootView;
	
	private TextView mTextViewMsg;
	public WaitDialogViewBuilder(BaseDialogFragment dialogFragment,Context context) {
		if(rootView == null){
			rootView = LayoutInflater.from(context).inflate(R.layout.layout_wait_dialog_style_2, null);
		}
		mTextViewMsg = (TextView) rootView.findViewById(R.id.id_txview_waitdialog_2);
	}
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		
	}

	@Override
	public void setView(View v) {

	}

	@Override
	public Dialog onCreateDialog(Bundle savedInstanceState) {
		return null;
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		
		return rootView;
	}

	@Override
	public void onAttach(Activity activity) {

	}

	@Override
	public void onDetach() {

	}

	@Override
	public void setButton(int which, CharSequence msg, OnClickListener l) {

	}

	@Override
	public void setTitle(CharSequence title) {

	}

	@Override
	public void setMessage(CharSequence message) {
		mTextViewMsg.setText(message);
	}

	@Override
	public void onActivityCreated(Bundle savedInstanceState) {

	}

}
